package vtt.android.cartoon_video.activities;

import vtt.android.cartoon_video.R;
import android.os.Bundle;
import android.view.MenuItem;

public class DetailActivity extends BaseSwipeBackActivity {
    public static final String EXTRA_URL = "url";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_detail);

        Bundle extras = getIntent().getExtras();
        if (extras != null) {
            String url = extras.getString(EXTRA_URL);
//            mDetailFragment = (DetailFragment) getSupportFragmentManager().findFragmentById(R.id.detailFragment);
//            mDetailFragment.loadUrl(url);
        }
    }
    
    @Override
    protected void initActionBar() {
        super.initActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setDisplayShowHomeEnabled(true);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        log.d("VTT>>> onOptionsItemSelected");
        if (item.getItemId() == android.R.id.home) {
            scrollToFinishActivity();
        }

        return super.onOptionsItemSelected(item);
    }
    
    @Override
    public void onBackPressed() {
        
    }
}